import React from 'react'
import {
    Table
} from '@devexpress/dx-react-grid-material-ui';
const styles = {
    banking: {
        backgroundColor: '#f5f5f5',
    },
    health: {
        backgroundColor: '#a2e2a4',
    },
    telecom: {
        backgroundColor: '#b3e5fc',
    },
    energy: {
        backgroundColor: '#ffcdd2',
    },
    insurance: {
        backgroundColor: '#f0f4c3',
    },
};

const TableRow = ({ row, ...restProps }) => (
    <Table.Row
        {...restProps}
        // eslint-disable-next-line no-alert
        onClick={() => alert(JSON.stringify(row))}
        style={{
            cursor: 'pointer',
            ...styles[row.sector.toLowerCase()],
        }}
    />
);

export default  TableRow